//
//  VerticalLineView.m
//  Volunteer
//
//  Created by guang on 15/1/16.
//  Copyright (c) 2015年 fangchou. All rights reserved.
//

#import "VerticalLineView.h"

@interface VerticalLineView()

@property (assign, nonatomic) CGRect rect;

@end

@implementation VerticalLineView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        // Initialization code
        self.backgroundColor = [UIColor clearColor];
        self.rect = frame;
    }
    return self;
}


- (void)drawRect:(CGRect)rect
{
    
    CGContextRef context = UIGraphicsGetCurrentContext();
    
    CGContextSetLineWidth(context, 0.5f);
    
    CGContextSetShouldAntialias(context, NO);
    
    CGContextSetStrokeColorWithColor(context, [[UIColor colorWithRed:220.0f/255.0f green:220.0f/255.0f blue:220.0f/255.0f alpha:1.0f] CGColor]);
    
    CGContextMoveToPoint(context, 0.0f, 0.0f);
    
    CGContextAddLineToPoint(context, 0.0f, self.rect.origin.y+self.rect.size.height);
    
    CGContextStrokePath(context);
}

@end
